using System.Collections.Generic;

namespace OpenWaves.ActivityFeed.Web.Tests
{
    public class FakeUserProfileProvider : IUserProfileProvider
    {
        public object GetUserProfile(string userId)
        {
            return FakeUserProfileProvider.Users[userId];
        }

        internal static readonly Dictionary<string, UserInfo> Users =
            new Dictionary<string, UserInfo> 
            {
                {
                    "john",
                    new UserInfo
                    {
                        Name = "John Smith",
                        PhotoUrl = "http://thecontentwrangler.com/wp-content/uploads/2011/08/User.png",
                        Roles = new string[] { "manager" }
                    }
                }, 
                
                {
                    "sam",
                    new UserInfo
                    {
                        Name = "Sam Sam",
                        PhotoUrl = "http://www.veryicon.com/icon/png/System/Free%20Business/User.png",
                        Roles = new string[] { "manager" }
                    }
                },
                
                {
                    "bob",
                    new UserInfo
                    {
                        Name = "Robert Johnson",
                        PhotoUrl = "http://midiot.net/spchar.jpg",
                        Roles = new string[] { "employee" }
                    }
                },
                
                {
                    "michael",
                    new UserInfo
                    {
                        Name = "Michael Williams",
                        PhotoUrl = "https://www.socialete.com/wp-content/uploads/2012/04/Michael_avatar.jpg",
                        Roles = new string[] { "employee" }
                    }
                },
            
                {
                    "david",
                    new UserInfo
                    {
                        Name = "David Brown",
                        PhotoUrl = "http://icongal.com/gallery/image/15635/user_avatar_david_boy_man_head.png",
                        Roles = new string[] { "administrator" }
                    }
                },
            
                {
                    "charles",
                    new UserInfo
                    {
                        Name = "Charles Taylor",
                        PhotoUrl = "http://forum.dobreprogramy.pl/download/file.php?avatar=21533_1327510881.jpeg",
                        Roles = new string[] { "manager", "administrator" }
                    }
                },
            
                {
                    "paul",
                    new UserInfo
                    {
                        Name = "Paul Anderson",
                        PhotoUrl = "http://dkg88rp4qbe6q.cloudfront.net/avatars/Paul/Papa_Smurf_profile.jpg",
                        Roles = new string[] { "manager, employee" }
                    }
                },            
            
                {
                    "steven",
                    new UserInfo
                    {
                        Name = "Steven Harris",
                        PhotoUrl = "http://www.gravatar.com/avatar/97371aee9f78ce2e7a2c0ec99f7d322b.png?s=100&d=retro&r=pg",
                        Roles = new string[0]
                    }
                }
            };
    }

    internal class UserInfo
    {
        public string Name { get; set; }
        public string PhotoUrl { get; set; }
        public string[] Roles { get; set; }  
    }
}